/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package negocio;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Dvid
 */
@Entity
@Table(name = "rol")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Rol.findAll", query = "SELECT r FROM Rol r"),
    @NamedQuery(name = "Rol.findById", query = "SELECT r FROM Rol r WHERE r.id = :id"),
    @NamedQuery(name = "Rol.findByHExtra", query = "SELECT r FROM Rol r WHERE r.hExtra = :hExtra"),
    @NamedQuery(name = "Rol.findByComision", query = "SELECT r FROM Rol r WHERE r.comision = :comision"),
    @NamedQuery(name = "Rol.findByFecha", query = "SELECT r FROM Rol r WHERE r.fecha = :fecha"),
    @NamedQuery(name = "Rol.findByContratoid", query = "SELECT r FROM Rol r WHERE r.contratoid = :contratoid"),
    @NamedQuery(name = "Rol.findByMontoTot", query = "SELECT r FROM Rol r WHERE r.montoTot = :montoTot")})
public class Rol implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "h_extra")
    private Integer hExtra;
    @Column(name = "comision")
    private Integer comision;
    @Column(name = "fecha")
    @Temporal(TemporalType.DATE)
    private Date fecha;
    @Column(name = "contratoid")
    private Integer contratoid;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "montoTot")
    private Double montoTot;

    public Rol() {
    }

    public Rol(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getHExtra() {
        return hExtra;
    }

    public void setHExtra(Integer hExtra) {
        this.hExtra = hExtra;
    }

    public Integer getComision() {
        return comision;
    }

    public void setComision(Integer comision) {
        this.comision = comision;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public Integer getContratoid() {
        return contratoid;
    }

    public void setContratoid(Integer contratoid) {
        this.contratoid = contratoid;
    }

    public Double getMontoTot() {
        return montoTot;
    }

    public void setMontoTot(Double montoTot) {
        this.montoTot = montoTot;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Rol)) {
            return false;
        }
        Rol other = (Rol) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "negocio.Rol[ id=" + id + " ]";
    }
    
}
